<?php

$____s____=$_POST['s'];


$____s____=explode(PHP_EOL, $____s____);

array_pop($____s____);

// file_put_contents("abc.txt",json_encode($____s____,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT));

echo json_encode($____s____,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);